

	function getSubjectMsgByPage(topic_id,menuId, flag){
		
		var params = "topic_id="+topic_id+"&id="+menuId+"&flag="+flag;
		var pageUrl='../WebSubject/querySubjectMsgPage.htm';				
		$("#paging").asynPage(pageUrl,params,'#tbodyPage',buildHtml,10,'rows','total');	
	}
	
//异步分页
function buildHtml(data){	
	var str ="";
	if(data!=null && data.length>0){		    		
		for (var i=0;i<data.length;i++)
		{
			var href = "../WebSubject/detailMsgPage.htm?id="+data[i].id + "&menu_id=" + data[i].menu_id;
			if(data[i].isLink == '1')
			{
				href=data[i].linkURL;
			}
			
			var d = data[i].createTime;
			 var test = new Date(parseInt(d));  
			 var _year = test.getFullYear();  
			 var _month = parseInt(test.getMonth())+1;  
			 var _day = test.getDate();  
			
			str+="<tr>";
			str+="<td height='28'";
			str+="	background='../../../../images/tit_bg001.png'><a";
			str+="	href='"+href+"'";
			str+="	target='_blank'";
			str+="	title='"+data[i].title+"'>" + data[i].title;
			str+="</a></td>";
			str+="	<td width='130'";
			str+="	background='../../../../images/rmyh_pic4.jpg'><div";
			str+="		align='center' class='f12'>["+_year+"年"+_month+"月"+_day+"日]</div></td>";
			str+="</tr>";
		}   		
			
		$("#tbodyPage").append(str);			    		
	}else{
		$("#tbodyPage").append('没有符合条件的数据!');
	}			
}
